//
//  ViewController.m
//  lesson two
//
//  Created by smile~祚 on 16/9/19.
//  Copyright © 2016年 1511. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.tableView.rowHeight=UITableViewAutomaticDimension;
    self.tableView.estimatedRowHeight=40;
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:indexPath.row%2==0?@"test":@"test2"forIndexPath:indexPath];
    
//    cell.textLabel.text = @"德玛西亚";
//    cell.detailTextLabel.text = @"万岁！！！";
//    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:indexPath.row%2==0?@"test":@"test2"forIndexPath:indexPath];
//    if(indexPath.row%2==0)
//    {
//    cell.textLabel.text = @"德玛西亚";
//    cell.detailTextLabel.text = @"万岁！！！";
//    }
//    else
//    {
//        cell.textLabel.text = @"断剑重铸之日，";
//        cell.detailTextLabel.text = @"骑士归来之时！";
//    }
    return cell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
